/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ceair.flight.refund.dto.uatp;

/**
 *
 * @author Colin_You
 */
public class QueryCardForRefundNo {

    private long timestamp;
    private String flightOrderNo;
    private String ticketNo;

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public String getFlightOrderNo() {
        return flightOrderNo;
    }

    public void setFlightOrderNo(String flightOrderNo) {
        this.flightOrderNo = flightOrderNo;
    }

    public String getTicketNo() {
        return ticketNo;
    }

    public void setTicketNo(String ticketNo) {
        this.ticketNo = ticketNo;
    }

    public void check() {
        if (flightOrderNo == null || !flightOrderNo.matches("^\\d{16}$")) {
            throw new IllegalArgumentException("Invalid flight order No '" + flightOrderNo + "'");
        }
    }

    @Override
    public String toString() {
        return "QueryCardForRefundNo{" + "timestamp=" + timestamp + ", flightOrderNo=" + flightOrderNo + ", ticketNo=" + ticketNo + '}';
    }

}
